import config from '../config/config';
import request from '../utils/request';

let service = {};

//超值兑换商品
service.getcheap_goods = (param, cb) => {
  param = param || {};

  let requestUrl = config.api.getcheap_goods;
  request({
    url: requestUrl,
    // showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    }
  });
}
//买家运动步数
service.getstep = (param, cb) => {
  param = param || {};

  let requestUrl = config.api.getstep;
  request({
    url: requestUrl,
    // showLoading: true,
    data: param,
    method: 'POST',
    success: res => {
      cb(res);
    }
  });
}

//买家兑换运动步数
service.getstepconch = (param, cb) => {
  param = param || {};

  let requestUrl = config.api.getstepconch;
  request({
    url: requestUrl,
    // showLoading: true,
    data: param,
    method: 'POST',
    success: res => {
      cb(res);
    }
  });
}
module.exports = service;